import { Component } from 'react';
import React from 'react';
import { connect } from 'umi';
import HighPerformCardList from '@/components/HighPerformCardList';
import { PlusOutlined } from '@ant-design/icons';
import { Button } from 'antd';

class ComponentManager extends Component {
  actionRef?:any
  render() {
    return (
      <div>
        <HighPerformCardList 
          ref={(ref)=>this.actionRef=ref}
          toolBarRender={() => [
            <Button type="primary" onClick={() => this.actionRef?.handleModalVisible(true)}>
              <PlusOutlined /> 新增模板
            </Button>,
          ]}
        ></HighPerformCardList>
      </div>
    );
  }
}

export default connect()(ComponentManager);